﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
using BaseControls;
using HOG.Controls;

namespace HOG.Controls
{
    public partial class PauseControl : UserControl
    {
        public PauseControl()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            FrameControl control = (FrameControl)(this.Parent as Panel).FindName("FrameControl");             
            if (control != null)
                (control as IHudGameInterface).GetClock().UnPause();            
            ((this.Parent) as Canvas).Children.Remove(this);
            if (Close != null)
                Close(null,null);
        }
        public EventHandler Close;        
    }
}
